<?php $this->beginClip('og_metas') ?>
	<meta property="og:title" content="<?php echo $store['name'] ?> | El Carmen | Centro Comercial Online" />
	<meta property="og:url" content="<?php echo Yii::app()->getBaseUrl(true); ?><?php echo $this->createUrl('store/index', array('name'=>$store['name'])) ?>" />
	<meta property="og:description" content="<?php echo $store['name']; ?> | El Carmen | Centro Comercial Online. Estamos listos para atender tu necesidad de equipos, suministros y accesorios en lo que a computación se refiere." />
	<meta property="og:image" content="<?php echo Yii::app()->getBaseUrl(true); ?>/images/marcas/<?php echo $store['id'] ?>/big_<?php echo $store['logo_url'] ?>" />
	<link rel="image_src" href="<?php echo Yii::app()->getBaseUrl(true); ?>/images/marcas/<?php echo $store['id'] ?>/big_<?php echo $store['logo_url'] ?>" />
<?php $this->endClip() ?>
<?php $this->beginClip('social') ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo Yii::app()->getBaseUrl(true); ?><?php echo $this->createUrl('store/index', array('name'=>$store['name'])) ?>"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
<?php $this->endClip() ?>
<div id="store">
	<div id="menu">
		<h2><a href="<?php echo $this->createUrl('store/index', array('name'=>$store['name'])) ?>"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/marcas/<?php echo $store['id'] ?>/<?php echo $store['logo_url'] ?>" class="logo"/></a></h2>
		<div id="description">
			<?php echo $store['content'] ?>
			<?php if (!Yii::app()->user->isGuest && $store['name']==Yii::app()->user->store_name): ?>
				<a id="store_edit" style="display:none" href="<?php echo $this->createUrl('store/edit', array('name'=>$store['name'])) ?>" rel="facebox"  hint="Editar descripción"><img src="images/edit.png" hint="Editar descripción"/></a>
			</div>
			<script type="text/javascript" charset="utf-8">
				$('#menu').hover(
					function(){
						$('#store_edit').fadeIn(100);
					},
					function(){
						$('#store_edit').fadeOut(100);
					});
			</script>
			<?php else: ?>
				</div>
			<?php endif ?>
	</div>
	<div id="catalog">
		<div id="form">
			<?php echo CHtml::beginForm(); ?>
				<?php echo CHtml::textField('key', 'Todos'); ?>
				<?php echo CHtml::hiddenField('id', $store['id']); ?>
				<?php echo CHtml::ajaxSubmitButton('Buscar', array('store/search'), array('update'=>'#product-list',), array('type'=>'submit',)); ?>
			<?php echo CHtml::endForm(); ?>
		</div>
		<div id="product-list">
		<?php $this->renderPartial('_products', array('products' => $products, 'types'=>$types, 'store'=>$store))?>
		</div>
	</div>
	<div class="clear"></div>
	<?php if (!Yii::app()->user->isGuest && $store['name']==Yii::app()->user->store_name): ?>
		<!-- begin olark code --><script type='text/javascript'>/*{literal}<![CDATA[*/window.olark||(function(i){var e=window,h=document,a=e.location.protocol=="https:"?"https:":"http:",g=i.name,b="load";(function(){e[g]=function(){(c.s=c.s||[]).push(arguments)};var c=e[g]._={},f=i.methods.length; while(f--){(function(j){e[g][j]=function(){e[g]("call",j,arguments)}})(i.methods[f])} c.l=i.loader;c.i=arguments.callee;c.f=setTimeout(function(){if(c.f){(new Image).src=a+"//"+c.l.replace(".js",".png")+"&"+escape(e.location.href)}c.f=null},20000);c.p={0:+new Date};c.P=function(j){c.p[j]=new Date-c.p[0]};function d(){c.P(b);e[g](b)}e.addEventListener?e.addEventListener(b,d,false):e.attachEvent("on"+b,d); (function(){function l(j){j="head";return["<",j,"></",j,"><",z,' onl'+'oad="var d=',B,";d.getElementsByTagName('head')[0].",y,"(d.",A,"('script')).",u,"='",a,"//",c.l,"'",'"',"></",z,">"].join("")}var z="body",s=h[z];if(!s){return setTimeout(arguments.callee,100)}c.P(1);var y="appendChild",A="createElement",u="src",r=h[A]("div"),G=r[y](h[A](g)),D=h[A]("iframe"),B="document",C="domain",q;r.style.display="none";s.insertBefore(r,s.firstChild).id=g;D.frameBorder="0";D.id=g+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){D.src="javascript:false"} D.allowTransparency="true";G[y](D);try{D.contentWindow[B].open()}catch(F){i[C]=h[C];q="javascript:var d="+B+".open();d.domain='"+h.domain+"';";D[u]=q+"void(0);"}try{var H=D.contentWindow[B];H.write(l());H.close()}catch(E){D[u]=q+'d.write("'+l().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}c.P(2)})()})()})({loader:(function(a){return "static.olark.com/jsclient/loader0.js?ts="+(a?a[1]:(+new Date))})(document.cookie.match(/olarkld=([0-9]+)/)),name:"olark",methods:["configure","extend","declare","identify"]});
/* custom configuration goes here (www.olark.com/documentation) */
olark.identify('6071-862-10-7797');/*]]>{/literal}*/</script>
<!-- end olark code -->
	<?php else: ?>
		<?php if ($store['chat_code']!=""): ?>
		<div id="chat">
			<div id="chat-header">
				<img height="9" width="9" style="padding:0 2px 0 0;margin:0;border:none" src="http://www.google.com/talk/service/badge/Show?tk=<?php echo $store['chat_code'] ?>&amp;w=9&amp;h=9" alt="">
				<a id="achat" href="javascript:return false;" title="Haz clic aquí para hablar con nosotros."><?php echo $store['name'] ?>: Habla con nosotros</a>
			</div>
			<div id="chat-body" style="display:none;">
				<iframe frameborder=0 width="100%" height="240px" src=" http://www.google.com/talk/service/badge/Start?tk=<?php echo $store['chat_code'] ?>">
				</iframe>
			</div>
		</div>	
		<?php endif ?>
	<?php endif ?>
	
</div>
<script type="text/javascript" charset="utf-8">
	$('#achat').click(function(){		
		$('#chat-body').toggle();
	});
</script>